package cn.edu.zafu.bigdata.x.yaojy;
import java.util.HashMap;

public class StudentGradeManager {
    private HashMap<String ,Integer> studentGrades;

    public StudentGradeManager(){
        studentGrades = new HashMap<>();
    }

    public void addStudent(String name, int grade){
        studentGrades.put(name,grade);
    }

    public int getGrade(String name){
        return studentGrades.getOrDefault(name,-1);
    }

    public void removeStudent(String name){
        studentGrades.remove(name);
    }

}
